//package com.zrx.zrxaicodemother.manager;
//
//import org.openqa.selenium.WebDriver;
//import org.springframework.stereotype.Component;
//
//import java.util.concurrent.CompletableFuture;
//import java.util.concurrent.ExecutorService;
//import java.util.concurrent.Executors;
//
//import static com.zrx.zrxaicodemother.tools.WebScreenshotUtils.initChromeDriver;
//
//
//@Component
//public class ScreenshotManager {
//    private static final WebDriver webDriver = initChromeDriver();
//    private final ExecutorService executor = Executors.newSingleThreadExecutor();
//
//    public CompletableFuture<String> takeScreenshot(String url) {
//        return CompletableFuture.supplyAsync(() -> {
//            webDriver.get(url);
//            return doScreenshot(webDriver);
//        }, executor);
//    }
//}
